using net_work.Data.DTO.Hmw;
using net_work.Data.Entity.Hmw;

namespace net_work.IRepository.Hmw;

public interface IHomeworkRepository : IRepository<Homework>
{
    /// <summary>
    /// 插入作业
    /// </summary>
    /// <param name="homeworkAddRequest">插入作业</param>
    /// <returns>作业id</returns>
    Task<long> InsertAsync(HomeworkAddRequest homeworkAddRequest);

    /// <summary>
    /// 更新作业信息
    /// </summary>
    /// <param name="homeworkUpdateRequest">更新作业信息</param>
    /// <returns>是否成功</returns>
    Task<bool> UpdateAsync(HomeworkUpdateRequest homeworkUpdateRequest);

    /// <summary>
    /// 发布作业
    /// </summary>
    /// <param name="homeworkId">作业id</param>
    /// <returns>是否成功</returns>
    Task<bool> Release(long homeworkId);
}